package easybooking.data;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import java.util.*;

/**
 * Implementation of the Interface <code>Flight</code>.
 * @see Flight
 * @author Hakan Keles
 */
// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.A154D5E7-03A7-D63E-AD01-75402E8CFADB]
// </editor-fold> 
public class FlightImpl extends UnicastRemoteObject implements Flight {

    /**
     * The ID of the flight.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.B71A4D43-ED77-1128-85F2-FC2B433340CA]
    // </editor-fold> 
    private int flightId = 0;
    /**
     * The Date of the flight.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.9F64D833-4F81-E710-7119-F6BB48AB1155]
    // </editor-fold> 
    private Date dateTime = null;
    /**
     * Association to the plane ID, which executes the flight.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.6E1B229A-6F31-3894-CD3D-21B7A5D308FA]
    // </editor-fold> 
    private int planeId = 0;
    /**
     * Association to the airport ID, where the flight starts.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.BFEC7F1A-B04D-BB8D-95B6-FFE6B3B4C160]
    // </editor-fold> 
    private int startAirportId = 0;
    /**
     * Association to the airport ID, where the flight stops.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.2DDDCB8A-483C-EC1A-F9DA-80D6674260A5]
    // </editor-fold> 
    private int destAirportId = 0;
    /**
     * The status of the flight.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.AFF6359B-3633-317B-0B17-A4E185462863]
    // </editor-fold> 
    private boolean isActive = true;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.903230DC-D363-D9C1-C2D7-B5FA206FACEE]
    // </editor-fold> 
    public FlightImpl() throws RemoteException {
    }

    /**
     * Read-out the ID of the flight.
     * @return ID
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.3DB1B884-E5CC-BEB6-99AE-F8A89DF54ED7]
    // </editor-fold> 
    public int getFlightId() throws RemoteException {
        return this.flightId;
    }

    /**
     * Read-out the Date of the flight.
     * @return Date
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.AC31FAF7-94C4-635B-302A-D175CFD87B19]
    // </editor-fold> 
    public Date getDateTime() throws RemoteException {
        return this.dateTime;
    }

    /**
     * Read-out the ID of the plane, which executes the flight.
     * @return ID
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.DB2D473F-8B05-8BC2-1C9D-BA1972BC9E73]
    // </editor-fold> 
    public int getPlaneId() throws RemoteException {
        return this.planeId;
    }

    /**
     * Read-out the ID of the airport, where the flight starts.
     * @return ID
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.2CADCD0D-5CFF-DD17-7391-B9E2D24A0672]
    // </editor-fold> 
    public int getStartAirportId() throws RemoteException {
        return this.startAirportId;
    }

    /**
     * Read-out the ID of the airport, where the flight stops.
     * @return ID
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.2149AA61-6F25-522E-0CB1-DB8B39B5736C]
    // </editor-fold> 
    public int getDestAirportId() throws RemoteException {
        return this.destAirportId;
    }

    /**
     * Set the ID of the flight.
     * @param flightId The id of the flight.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.C42B52CB-5A03-E9B0-96D4-DB686F5033C4]
    // </editor-fold> 
    public void setFlightId(int flightId) throws RemoteException {
        this.flightId = flightId;
    }

    /**
     * Set the Date of the flight.
     * @param dateTime The Date of the flight.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.137E541A-E3C1-1841-36BF-004E79EBC7F1]
    // </editor-fold> 
    public void setDateTime(Date dateTime) throws RemoteException {
        this.dateTime = dateTime;
    }

    /**
     * Set the ID of the plane, which executes the flight.
     * @param planeId The ID of the plane.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.402A0E0F-CD65-5C58-A13B-CF34A1A8DBE0]
    // </editor-fold> 
    public void setPlaneId(int planeId) throws RemoteException {
        this.planeId = planeId;
    }

    /**
     * Set the ID of the airport, where the flight starts.
     * @param startAirportId The ID of the start airport.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.ECB22C23-FC47-FF76-57A2-12A917310546]
    // </editor-fold> 
    public void setStartAirportId(int startAirportId) throws RemoteException {
        this.startAirportId = startAirportId;
    }

    /**
     * Set the ID of the airport, where the flight stops.
     * @param destAirportId The ID of the destination airport.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.DC788DDA-AC8F-902D-420F-93B3F95F6D98]
    // </editor-fold> 
    public void setDestAirportId(int destAirportId) throws RemoteException {
        this.destAirportId = destAirportId;
    }

    /**
     * Read-out the status of the flight.
     * @return status
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.886C2872-A9D7-BD1B-9C38-64C277357748]
    // </editor-fold> 
    public boolean getIsActive() throws RemoteException {
        return this.isActive;
    }

    /**
     * Set the status of the flight.
     * @param status The status of the flight.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.0B90F354-6006-BA33-B460-D27072ACDA0A]
    // </editor-fold> 
    public void setIsActive(boolean status) throws RemoteException {
        this.isActive = status;
    }
}

